//
//  MDNet.m
//  SmartBusiness
//
//  Created by 梦居 on 2018/9/4.
//  Copyright © 2018年 MD. All rights reserved.
//

#import "MDNet.h"

@implementation MDNet
+ (instancetype)shareInit
{
    static MDNet * _mdNet = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _mdNet = [[MDNet alloc]initWithBaseURL:[NSURL URLWithString:BaseURL]];
        _mdNet.securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone];
        _mdNet.requestSerializer.timeoutInterval = 30;
        _mdNet.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", @"text/html", nil];
    });
    return _mdNet;
}
@end
